home *** CD-ROM | disk | FTP | other *** search
/ Georgia Wildfire Prevention / Georgia Wildfire Prevention.iso / pc / media / dirs / BackUp / code.cst / 00014_Script_video cues < prev    next >
Text File  |  2002-10-15  |  2KB  |  79 lines

  1. property events,times,vidsprite,next_time,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,list_source,snd
  2.  
  3. on getpropertydescriptionlist me
  4.   plist=[#snd:[#comment:"Video spritenum",#format:#integer,#default:""],\
  5. #list_source:[#comment:"Time list (if used)",#format:#string,#default:""],\
  6. #a1:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  7. #a2:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  8. #a3:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  9. #a4:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  10. #a5:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  11. #a6:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  12. #a7:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  13. #a8:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  14. #a9:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  15. #a10:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  16. #a11:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  17. #a12:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  18. #a13:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  19. #a14:[#comment:"TIME@ACTION",#format:#string,#default:""],\
  20. #a15:[#comment:"TIME@ACTION",#format:#string,#default:""]]
  21.   return plist
  22. end
  23.  
  24. on beginsprite me
  25.   times=[]
  26.   events=[]
  27.   vidsprite=sprite(snd)
  28.   oid=the itemdelimiter
  29.   the itemdelimiter="@"
  30.   if list_source<>"" and list_source<>Void then 
  31.     parse_list(me)
  32.   else
  33.     repeat with i=1 to 15
  34.       grp=symbol("a"&string(i))
  35.       str=me[grp]
  36.       if str<>Void then
  37.         n_time=str.item[1]
  38.         n_action=str.item[2]
  39.         times.add(n_time)
  40.         events.add(n_action)
  41.       end if
  42.     end repeat
  43.   end if
  44.   the itemdelimiter=oid
  45.   next_time=times[1]
  46.   vidsprite.movierate=1
  47. end
  48.  
  49. on exitframe me
  50.   if vidsprite.movietime>=next_time then
  51.     act=events[1]
  52.     do(act)
  53.     deleteat(events,1)
  54.     deleteat(times,1)
  55.     if times.count>0 then
  56.       next_time=times[1]
  57.     else
  58.       next_time=999999999999999
  59.     end if
  60.   end if
  61.   go the frame
  62. end
  63.  
  64. on parse_list me
  65.   str=member(list_source).text
  66.   nl=member(list_source).linecount
  67.   repeat with i=1 to nl
  68.     ntry=str.line[i]
  69.     if ntry.length>3 then
  70.       tim=value(ntry.item[1])
  71.       act=ntry.item[2]
  72.       times.add(tim)
  73.       events.add(act)
  74.     end if
  75.   end repeat
  76. end
  77.  
  78.  
  79.